package com.treeroot.treenet.protocol;

import java.nio.channels.SelectionKey;

/**
 * Create By TreeRoot
 * Create Time: 2023/12/18 03:45
 * Class Name: BaseProtocolHandle
 * Description:
 * 协议基础处理器
 *
 * @author TreeRoot
 */
public interface BaseProtocolHandle<T> {


    /**
     * 接受连接
     *
     * @param t t
     */
    void acceptConnection(T t);


    /**
     * 从客户端读取数据
     *
     * @param key 选择的通道
     */
    void readDataFromClient(SelectionKey key,ConnectDataCallback connectDataCallback);


}
